﻿
Partial Class Hosteria_VS_TiposDeHabitacion
    Inherits System.Web.UI.Page

    Private Property dbResult As Integer

    Protected Sub btnAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAgregar.Click
        sdaTiposDeHabitacion.InsertParameters.Item("Id").DefaultValue = txtId.Text
        sdaTiposDeHabitacion.InsertParameters.Item("Descripcion").DefaultValue = txtDescripcion.Text()
        sdaTiposDeHabitacion.InsertParameters.Item("Precio").DefaultValue = txtPrecio.Text()
        dbResult = sdaTiposDeHabitacion.Insert()
        If dbResult = 1 Then
            txtId.Text = ""
            txtDescripcion.Text = ""
            txtPrecio.Text = ""
        Else
            MsgBox("No se pudo agregar.", MsgBoxStyle.Exclamation, "Error de sistema")
        End If

    End Sub

End Class
